﻿using SellAndBuy.Application.Query.DTOs;
using SellAndBuy.Application.Query.Finders;
using SellAndBuy.Infrastructure.Data.Core;
using SellAndBuy.Infrastructure.Data.Core.Finders;

namespace SellAndBuy.Infrastructure.Data.Query.Finders
{
    /// <summary>
    /// Item Finder
    /// </summary>
    public class ItemFinder : Finder<ItemDTO>, IItemFinder
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="unitOfWork"></param>
        public ItemFinder(INhibernateUnitOfWork unitOfWork)
            : base(unitOfWork)
        {
        }

        /// <summary>
        /// Find items for category
        /// </summary>
        /// <param name="category">category</param>
        /// <returns></returns>
        //public IQueryable<Item> FindByCategory(ItemCategoryDTO category)
        //{
        //    return base.FindBy(item => item.Category == category);
        //}

        /// <summary>
        /// Find items for category (Paged)
        /// </summary>
        /// <param name="category">category</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        //public IQueryable<Item> FindByCategory(ItemCategory category, int pageIndex, int pageCount)
        //{
        //    return base.FindBy(item => item.Category == category, pageIndex, pageCount);
        //}

    }
}